package model.effects;
import java.io.Serializable;
import model.game.Item;
import model.game.Player;
import model.game.Skill;
public class Heal extends EffectDecorator implements Serializable{
    private Player player;
    private int amountOfHeal;
    //heal on item
        public Heal(Item decoratedItem, Player player, int amountOfHeal) {
        super(decoratedItem);
        this.player = player;
        this.amountOfHeal = amountOfHeal;
    }
    //heal on skill
        public Heal(Skill decoratedSkill, Player player, int amountOfHeal){
            super(decoratedSkill);
            this.player = player;
            this.amountOfHeal = amountOfHeal;
        }
    @Override
    public void use(){    
        super.use();
        player.setLife(player.getLife()+amountOfHeal);
    }
    
}
